home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / include / xpcom / nsIVersionComparator.h < prev    next >
C/C++ Source or Header  |  2006-05-08  |  4KB  |  126 lines

  1. /*
  2.  * DO NOT EDIT.  THIS FILE IS GENERATED FROM nsIVersionComparator.idl
  3.  */
  4.  
  5. #ifndef __gen_nsIVersionComparator_h__
  6. #define __gen_nsIVersionComparator_h__
  7.  
  8.  
  9. #ifndef __gen_nsISupports_h__
  10. #include "nsISupports.h"
  11. #endif
  12.  
  13. /* For IDL files that don't want to include root IDL files. */
  14. #ifndef NS_NO_VTABLE
  15. #define NS_NO_VTABLE
  16. #endif
  17.  
  18. /* starting interface:    nsIVersionComparator */
  19. #define NS_IVERSIONCOMPARATOR_IID_STR "e6cd620a-edbb-41d2-9e42-9a2ffc8107f3"
  20.  
  21. #define NS_IVERSIONCOMPARATOR_IID \
  22.   {0xe6cd620a, 0xedbb, 0x41d2, \
  23.     { 0x9e, 0x42, 0x9a, 0x2f, 0xfc, 0x81, 0x07, 0xf3 }}
  24.  
  25. /**
  26.  * Version strings are dot-separated sequences of version-parts.
  27.  *
  28.  * A version-part consists of up to four parts, all of which are optional:
  29.  *
  30.  * <number-a><string-b><number-c><string-d (everything else)>
  31.  *
  32.  * A version-part may also consist of a single asterisk "*" which indicates
  33.  * "infinity".
  34.  *
  35.  * Numbers are base-10, and are zero if left out.
  36.  * Strings are compared bytewise.
  37.  *
  38.  * For additional backwards compatibility, if "string-b" is "+" then
  39.  * "number-a" is incremented by 1 and "string-b" becomes "pre".
  40.  *
  41.  * 1.0pre1
  42.  * < 1.0pre2  
  43.  *   < 1.0 == 1.0.0 == 1.0.0.0
  44.  *     < 1.1pre == 1.1pre0 == 1.0+
  45.  *       < 1.1pre1a
  46.  *         < 1.1pre1
  47.  *           < 1.1pre10a
  48.  *             < 1.1pre10
  49.  *
  50.  * Although not required by this interface, it is recommended that
  51.  * numbers remain within the limits of a signed char, i.e. -127 to 128.
  52.  */
  53. class NS_NO_VTABLE nsIVersionComparator : public nsISupports {
  54.  public: 
  55.  
  56.   NS_DEFINE_STATIC_IID_ACCESSOR(NS_IVERSIONCOMPARATOR_IID)
  57.  
  58.   /**
  59.    * Compare two version strings
  60.    * @param   A   The first version
  61.    * @param   B   The second version
  62.    * @returns < 0 if A < B
  63.    *          = 0 if A == B
  64.    *          > 0 if A > B
  65.    */
  66.   /* long compare (in ACString A, in ACString B); */
  67.   NS_IMETHOD Compare(const nsACString & A, const nsACString & B, PRInt32 *_retval) = 0;
  68.  
  69. };
  70.  
  71. /* Use this macro when declaring classes that implement this interface. */
  72. #define NS_DECL_NSIVERSIONCOMPARATOR \
  73.   NS_IMETHOD Compare(const nsACString & A, const nsACString & B, PRInt32 *_retval); 
  74.  
  75. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  76. #define NS_FORWARD_NSIVERSIONCOMPARATOR(_to) \
  77.   NS_IMETHOD Compare(const nsACString & A, const nsACString & B, PRInt32 *_retval) { return _to Compare(A, B, _retval); } 
  78.  
  79. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  80. #define NS_FORWARD_SAFE_NSIVERSIONCOMPARATOR(_to) \
  81.   NS_IMETHOD Compare(const nsACString & A, const nsACString & B, PRInt32 *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->Compare(A, B, _retval); } 
  82.  
  83. #if 0
  84. /* Use the code below as a template for the implementation class for this interface. */
  85.  
  86. /* Header file */
  87. class nsVersionComparator : public nsIVersionComparator
  88. {
  89. public:
  90.   NS_DECL_ISUPPORTS
  91.   NS_DECL_NSIVERSIONCOMPARATOR
  92.  
  93.   nsVersionComparator();
  94.  
  95. private:
  96.   ~nsVersionComparator();
  97.  
  98. protected:
  99.   /* additional members */
  100. };
  101.  
  102. /* Implementation file */
  103. NS_IMPL_ISUPPORTS1(nsVersionComparator, nsIVersionComparator)
  104.  
  105. nsVersionComparator::nsVersionComparator()
  106. {
  107.   /* member initializers and constructor code */
  108. }
  109.  
  110. nsVersionComparator::~nsVersionComparator()
  111. {
  112.   /* destructor code */
  113. }
  114.  
  115. /* long compare (in ACString A, in ACString B); */
  116. NS_IMETHODIMP nsVersionComparator::Compare(const nsACString & A, const nsACString & B, PRInt32 *_retval)
  117. {
  118.     return NS_ERROR_NOT_IMPLEMENTED;
  119. }
  120.  
  121. /* End of implementation class template. */
  122. #endif
  123.  
  124.  
  125. #endif /* __gen_nsIVersionComparator_h__ */
  126.